<template>
  <div class="home">
    <homeHeader></homeHeader>
    <div id="bottom">
      <menuNav></menuNav>
      <main id="content">
        <div>
          <h3 style="text-align:center;line-height:50px">套餐统计</h3>
          <el-table :data="statisticsData" border style="width: 100%">
            <el-table-column prop="userPackagesName" label="套餐名称" align="center"></el-table-column>
            <el-table-column prop="createTime" label="点击时间" align="center"></el-table-column>
            <el-table-column prop="userPackagesResidueNum" label="剩余次数" align="center"></el-table-column>
          </el-table>
        </div>
      </main>
    </div>
  </div>
</template>

<script>
import menuNav from "../components/MenuNav";
import homeHeader from "../components/Header";
export default {
  name: "Home",
  components: {
    menuNav,
    homeHeader,
  },
  data() {
    return {
      statisticsData: [],
    };
  },
  created() {
    this.$post("/gg/appAdClickStatistics/select", {
      pageNum: 1,
      pageSize: 10,
      records: {
        userId: JSON.parse(sessionStorage.getItem("userMsg")).userId,
      },
    }).then((res) => {
      console.log(res.data);
      if ((res.data.code = 200)) {
        this.statisticsData = res.data.data.records;
      }
    });
  },
};
</script>
<style scoped>
img {
  width: 70%;
  margin: 0 100px;
}
</style>

